{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Single Barrier UpOut"
   ]
  },
  {
   "cell_type": "code",
   "metadata": {
    "collapsed": false,
    "is_executing": true,
    "ExecuteTime": {
     "end_time": "2025-11-11T08:37:01.610861Z",
     "start_time": "2025-11-11T08:36:50.062694Z"
    }
   },
   "source": [
    "from qdpmc import *\n",
    "\n",
    "mc = MonteCarlo(100, 1000000)\n",
    "bs = BlackScholes(0.03, 0.03, 0.22, 244)\n",
    "b = UpOut(\n",
    "    spot=5930.0, rebate=0, barrier=6130.0, ob_days=[1],\n",
    "    payoff=Payoff(plain_vanilla, strike=5630.0)\n",
    ")\n",
    "print(b.calc_value(mc, bs))"
   ],
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "295.1541389685277\n"
     ]
    }
   ],
   "execution_count": 1
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": ""
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
